<%@ page import="foo.bar.blog.web.action.administration.UserManagementActionBean" %>
<%@include file="/WEB-INF/pages/commons/commons.jsp"%>

    <script type="text/javascript">
        $(document).ready(function() {
            $('._view').click(function(eventObject) {
                view(this);
                return false;
            });
            $('._edit').click(function() {
                edit(this);
                return false;
            });
            $('._remove').click(function() {
                remove(this);
                return false;
            });
            $('._add').click(function() {
                add(this);
                return false;
            });
        });
    </script>

        <stripes:messages/>
        <stripes:errors/>


        <fmt:message var="col_id" key="userManagement_table.jsp.col.id" />
        <fmt:message var="col_username" key="userManagement_table.jsp.col.username" />
        <fmt:message var="col_email" key="userManagement_table.jsp.col.email" />
        <fmt:message var="col_blogActions" key="userManagement_table.jsp.col.actions"/>
        <displaytag:table id="element" name="actionBean.userPaginationList" sort="external"
                          excludedParams="*"
                          defaultsort="1"
                          defaultorder="ascending"
                          requestURI="/administration/UserManagement.action"
                          requestURIcontext="true" style="width:100%;">
            <displaytag_el:column property="id" sortable="false" sortName="id" title="${col_id}"  />
            <displaytag_el:column property="username" sortable="false" sortName="username" title="${col_username}" />
            <displaytag_el:column property="email" sortable="false" sortName="emailAddress" title="${col_email}" />
            <displaytag_el:column title="${col_blogActions}">
                <jsecurity:hasPermission name="user:addUser:*">
                <stripes:link class="_add" beanclass="foo.bar.blog.web.action.administration.UserManagementActionBean" event="viewAdd">
                    <fmt:message key="userManagement_table.jsp.action.add"/>
                </stripes:link>|
                </jsecurity:hasPermission>

                <jsecurity:hasPermission name="user:viewUser:${element.id}">
                <stripes:link class="_view" beanclass="foo.bar.blog.web.action.administration.UserManagementActionBean" event="viewDetails">
                    <stripes:param name="user" value="${element.id}"/>
                    <fmt:message key="userManagement_table.jsp.action.view"/>
                </stripes:link>|
                </jsecurity:hasPermission>

                <jsecurity:hasPermission name="user:editUser:${element.id}">
                <stripes:link class="_edit" beanclass="foo.bar.blog.web.action.administration.UserManagementActionBean" event="editDetails">
                    <stripes:param name="user" value="${element.id}"/>
                    <fmt:message key="userManagement_table.jsp.action.edit"/>
                </stripes:link>|
                </jsecurity:hasPermission>

                <jsecurity:hasPermission name="user:removeUser:${element.id}">
                <stripes:link class="_remove" beanclass="foo.bar.blog.web.action.administration.UserManagementActionBean" event="deleteDetails">
                    <stripes:param name="user" value="${element.id}"/>
                    <fmt:message key="userManagement_table.jsp.action.remove"/>
                </stripes:link>
                </jsecurity:hasPermission>
            </displaytag_el:column>
        </displaytag:table>


